* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
	background-image: linear-gradient(125deg,#9e78ec,#adffaa,#ba1d1d,#d755ff33,#55ff7f);
	background-size: 400%;
	animation: bgmove 60s infinite;
}
@keyframes bgmove{
	0%{
		background-position: 0% 50%;
	}
	50%{
		background-position: 100% 50%;
	}
	100%{
		background-position: 0% 50%;
	}
}

/* 头部样式 */
header {
    background: #424242;
    color: #ffffff;
    padding: 10px 0;
    text-align: center;
}

header .logo {
    font-size: 24px;
    margin-bottom: 10px;
}

nav ul {
    list-style: none;
}

nav ul li {
    display: inline;
    margin-right: 20px;
}

nav a {
    text-decoration: none;
    color: #ffffff;
    padding: 5px 10px;
}

nav a:hover {
    background: #e8491d;
}

/* 横幅样式 */
.banner img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 0 20px;
}

/* 主要内容区域 */
main {
    padding: 20px;
}

section {
    margin-bottom: 20px;
}

h2 {
    color: #ffffff;
    margin-bottom: 10px;
}

p {
    text-align: justify;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* 图库样式 */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 10px; /* 根据需要调整间隔 */
    margin-bottom: 20px;
}

.image-container {
    /* 使用grid布局后，不再需要设置宽度 */
    position: relative;
}

.gallery img {
    width: 100%;
    height: auto;
    display: block;
}

.caption {
    text-align: center;
    background: #333;
    color: #fff;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 5px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.image-container:hover .caption {
    opacity: 1;
}

/* 表单样式 */
form {
    max-width: 500px;
    margin: 0 auto;
}

input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
}

button {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: 0;
    cursor: pointer;
}

button:hover {
    background: #e8491d;
}

/* 页脚样式 */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 10px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}
